package com.fengdi.everyday.easy;

/**
 * @Description 3370. 只包含置位位的最小整数
 * @Date 09:30
 */
public class SmallestNumber {
    public int smallestNumber(int n) {
        for(int i = n;;i++) {
            if(this.isFullOne(Integer.toBinaryString(i))) return i;
        }
    }

    private boolean isFullOne(String s) {
        for(char c : s.toCharArray()) {
            if(c != '1') return false;
        }
        return true;
    }
}
